﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BOM_PRODUCT_BOM_MASTER
// * CreateDate    : 2012/4/3 22:20:02
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/3 22:20:02
// * LastChanger   : 2012/4/3 22:20:02
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class BomProductBomMasterEntity : EntityBase
    {
        public BomProductBomMasterTable TableSchema
        {
            get
            {
                return BomProductBomMasterTable.Current;
            }
        }

        public BomProductBomMasterEntity()
        {

        }

        public BomProductBomMasterEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.BomId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_ID"]));
            this.ParentBomId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_BOM_ID"]));
            this.Version = Convert.ToString(CommonFunctions.ToObject(dr["VERSION"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.ItemType = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_TYPE"]));
            this.Seqence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQENCE"]));
            this.UnitDose = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_DOSE"]));
            this.LossRate = Convert.ToDecimal(CommonFunctions.ToObject(dr["LOSS_RATE"]));
            this.ConstantScrap = Convert.ToDecimal(CommonFunctions.ToObject(dr["CONSTANT_SCRAP"]));
            this.EffectiveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EFFECTIVE_DATE"]));
            this.ExpirationDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRATION_DATE"]));
            this.PickingProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_PRODUCT_TECHNIC_ID"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.ApproveStatus = Convert.ToInt32(CommonFunctions.ToObject(dr["APPROVE_STATUS"]));
            this.IsCustomerFor = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_CUSTOMER_FOR"]));
            this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
            this.StartLots = Convert.ToString(CommonFunctions.ToObject(dr["START_LOTS"]));
            this.EndLots = Convert.ToString(CommonFunctions.ToObject(dr["END_LOTS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public BomProductBomMasterEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.BomId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_ID"]));
            this.ParentBomId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_BOM_ID"]));
            this.Version = Convert.ToString(CommonFunctions.ToObject(dr["VERSION"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.ItemType = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_TYPE"]));
            this.Seqence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQENCE"]));
            this.UnitDose = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_DOSE"]));
            this.LossRate = Convert.ToDecimal(CommonFunctions.ToObject(dr["LOSS_RATE"]));
            this.ConstantScrap = Convert.ToDecimal(CommonFunctions.ToObject(dr["CONSTANT_SCRAP"]));
            this.EffectiveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EFFECTIVE_DATE"]));
            this.ExpirationDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRATION_DATE"]));
            this.PickingProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_PRODUCT_TECHNIC_ID"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.ApproveStatus = Convert.ToInt32(CommonFunctions.ToObject(dr["APPROVE_STATUS"]));
            this.IsCustomerFor = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_CUSTOMER_FOR"]));
            this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
            this.StartLots = Convert.ToString(CommonFunctions.ToObject(dr["START_LOTS"]));
            this.EndLots = Convert.ToString(CommonFunctions.ToObject(dr["END_LOTS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BomProductBomMasterTable.Current;
            }
        }

        #region Perporty List
        public string BomId
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_BOM_ID)); }
            set { SetData(BomProductBomMasterTable.C_BOM_ID, value); }
        }

        public string ParentBomId
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_PARENT_BOM_ID)); }
            set { SetData(BomProductBomMasterTable.C_PARENT_BOM_ID, value); }
        }

        public string Version
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_VERSION)); }
            set { SetData(BomProductBomMasterTable.C_VERSION, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_PRODUCT_ID)); }
            set { SetData(BomProductBomMasterTable.C_PRODUCT_ID, value); }
        }

        public string ItemType
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_ITEM_TYPE)); }
            set { SetData(BomProductBomMasterTable.C_ITEM_TYPE, value); }
        }

        public int Seqence
        {
            get { return Convert.ToInt32(GetData(BomProductBomMasterTable.C_SEQENCE)); }
            set { SetData(BomProductBomMasterTable.C_SEQENCE, value); }
        }

        public decimal UnitDose
        {
            get { return Convert.ToDecimal(GetData(BomProductBomMasterTable.C_UNIT_DOSE)); }
            set { SetData(BomProductBomMasterTable.C_UNIT_DOSE, value); }
        }

        public decimal LossRate
        {
            get { return Convert.ToDecimal(GetData(BomProductBomMasterTable.C_LOSS_RATE)); }
            set { SetData(BomProductBomMasterTable.C_LOSS_RATE, value); }
        }

        public decimal ConstantScrap
        {
            get { return Convert.ToDecimal(GetData(BomProductBomMasterTable.C_CONSTANT_SCRAP)); }
            set { SetData(BomProductBomMasterTable.C_CONSTANT_SCRAP, value); }
        }

        public DateTime EffectiveDate
        {
            get { return Convert.ToDateTime(GetData(BomProductBomMasterTable.C_EFFECTIVE_DATE)); }
            set { SetData(BomProductBomMasterTable.C_EFFECTIVE_DATE, value); }
        }

        public DateTime ExpirationDate
        {
            get { return Convert.ToDateTime(GetData(BomProductBomMasterTable.C_EXPIRATION_DATE)); }
            set { SetData(BomProductBomMasterTable.C_EXPIRATION_DATE, value); }
        }

        public string PickingProductTechnicId
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_PICKING_PRODUCT_TECHNIC_ID)); }
            set { SetData(BomProductBomMasterTable.C_PICKING_PRODUCT_TECHNIC_ID, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_STATUS)); }
            set { SetData(BomProductBomMasterTable.C_STATUS, value); }
        }

        public int ApproveStatus
        {
            get { return Convert.ToInt32(GetData(BomProductBomMasterTable.C_APPROVE_STATUS)); }
            set { SetData(BomProductBomMasterTable.C_APPROVE_STATUS, value); }
        }

        public int IsCustomerFor
        {
            get { return Convert.ToInt32(GetData(BomProductBomMasterTable.C_IS_CUSTOMER_FOR)); }
            set { SetData(BomProductBomMasterTable.C_IS_CUSTOMER_FOR, value); }
        }

        public string SupplierId
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_SUPPLIER_ID)); }
            set { SetData(BomProductBomMasterTable.C_SUPPLIER_ID, value); }
        }

        public string StartLots
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_START_LOTS)); }
            set { SetData(BomProductBomMasterTable.C_START_LOTS, value); }
        }

        public string EndLots
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_END_LOTS)); }
            set { SetData(BomProductBomMasterTable.C_END_LOTS, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(BomProductBomMasterTable.C_REMARK)); }
            set { SetData(BomProductBomMasterTable.C_REMARK, value); }
        }

        #endregion
    }


}

